\section{Architecture}
\frame{
\frametitle{Outline}
Here we show possible architectures for the development of the Artificial
Opponent:
\begin{itemize}
	\item One single agent
	\item One agent per task
	\item One agent per unit
\end{itemize}
and finally we discuss to convenience of having a meta agent role (called ``The
General'') that coordinates and weights the actions of the agents.
}
\subsection{One agent}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{Description \& Goals}
\begin{itemize}
	\item Description
		\begin{itemize}
			\item Only one agent has the control of all funcionalities of the
				player that represents
		\end{itemize}
	\item Goals
		\begin{itemize}
			\item The goal is to stay alive and	try to destroy the opponent
		\end{itemize}
\end{itemize}

\note{
The agent has multidisciplinary skills that allow him to be adapted to the game.
He should be able to respond and resolve the different game situations.
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{Communication \& Organization}
\begin{itemize}
	\item Communication
		\begin{itemize}
			\item Basic facts:
				\begin{itemize}
					\item There are no internal communication
					\item The communicating actors are the other players
					\item The goal is to create alliances, ask for help, etc.  				\end{itemize}
		
			\item Problems:
				\begin{itemize}
					\item Typical human-machine interaction problems
				\end{itemize}
		\end{itemize}
	\item Organization
		\begin{itemize}
			\item It is possible to start the game in an alliance or create it
				during the game
		\end{itemize}
\end{itemize}

\note{
{\bf problems:} If the other players are human players\ldots

{\bf Coordination:} In theory there are not a social structure between the
players, they are only warfare agents.  But\ldots

In the same way, alliances may be broken at any time, if there are no more
interests in common, if an agent betrays his allies, etc.
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{BDI}
\begin{itemize}
	\item Beliefs
		\begin{itemize}
			\item The agent wins the war if his units are alone in the map
			\item The agent can build more units as more resources can obtain
			\item All the enemy units are hostile and they can kill the agent
				units
		\end{itemize}
	\item Desires
		\begin{itemize}
			\item Win the game
			\item Have a good balance of military units and resource extractor
				units, depending on the strength of opponents and the resources
				available
			\item Achieve that opponents have a bad balance
		\end{itemize}
	\item Intentions
		\begin{itemize}
			\item Optimizing the balance
			\item Using military units to kill enemy units in an efficient way
				and to take control of resources
		\end{itemize}
\end{itemize}

\note{
{\bf take control of resources\ldots} avoiding that opponents have access to the
resources
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{Cooperative}
Players cooperate together and create alliances.

\note{
As I said before, this architecture take sense as a multi-agent solution if
there are the option that players cooperate together, not only respecting the
rules of the game, but also creating alliances.
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{One agent per task}
\frame{
\frametitle{Description \& Goals}
\begin{itemize}
	\item Description
		\begin{itemize}
			\item A player is represented by a group of agents that have delegated
			the responsibilities of part of the decisions
		\end{itemize}
	\item Goals
		\begin{itemize}
			\item In this case each agent will have different goals depending on each responsibilities
		\end{itemize}
\end{itemize}
\note{
\small
In this type of architecture the player is represented by different
agents. Each agent is responsible of part of the decisions, for example
one is responsible of the economics, another of the defense, etc. Then there
is another thing to think about, if this agents are autonomous and have to deal
with the other Agents to get a consensus or we have to create another agent that 
will act as a coordinator/decision agent.

Goals, a different goals and subgoals have to be well defined because having different agents
as a representation of a player may have conflicts in the decisions, a hierarchy on the agent can help.
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{Communication \& Organization}
\begin{itemize}
	\item Communication
		\begin{itemize}
			\item Basic facts:
				\begin{itemize}
					\item There is a need for internal communication
					\item The communication actors are the within agents (can also be other players)
					\item The goal is to create alliances, ask for help, etc.  				
				\end{itemize}
			\item Problems:
				\begin{itemize}
					\item Taking one decision or rank the possible decision
				\end{itemize}
		\end{itemize}
	\item Organization
		\begin{itemize}
			\item There has to be a defined agent's communication, and also define if there has to be
			players communication.
		\end{itemize}
\end{itemize}

\note{
\textbf{problems:}The decision or the ranking of decision. IF theres an agent that is responisble of
controlling the attack, and another that is responsible of the defense, they may have opposite goals.
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{BDI}
\begin{itemize}
	\item Beliefs
		\begin{itemize}
			\item Each agent has its own believes(I.e. Domestic agent can believe they need more mineral, 
			military agent believes that must attack always that is able to)
		\end{itemize}
	\item Desires
		\begin{itemize}
			\item Each agent has its own desires(I.e. Domestic agent desire to keep the maximum possible number of 
			collectors, the military agent desire to always have maximum number of soldiers)
		\end{itemize}
	\item Intentions
		\begin{itemize}
			\item Military agent can have the intention of vanish other players but not
			leave the own base unprotected
				own loses and maximizes enemy loses
			\item Domestic agent can have the intention of having always a surplus of mineral.
		\end{itemize}
\end{itemize}
}


\subsection{One agent per unit}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{Description \& Goals}
\begin{itemize}
	\item Description
		\begin{itemize}
			\item Each moving unit in the game has its own agent.
			\item There are agent roles based on the unit type
		\end{itemize}
	\item Goals
		\begin{itemize}
			\item As with the other architectures, the goal is to stay alive and
				try to destroy the opponent
		\end{itemize}
\end{itemize}

\note{
Agents are specialized based on their unit type. There will be Tank agents,
Plane agents, Builder agents, etc\ldots
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{Communication \& Organization}
\begin{itemize}
	\item Communication
		\begin{itemize}
			\item Basic facts:
				\begin{itemize}
					\item Ideally the communication can between all the agents ($N^2$)
					\item Special messages should be routed to the specialized agent
				\end{itemize}
		
			\item Problems:
				\begin{itemize}
					\item Coordination could be a problem when massive number of units
						are involved
					\item Almost 99\% noisy channel when broadcasting messages
				\end{itemize}
		\end{itemize}
	\item Organization
		\begin{itemize}
			\item It seems that the most suitable organization is a hierarchical
				one
			\item In order to solve the communication problems, perhaps
				hierarchical roles should be created
		\end{itemize}
\end{itemize}

\note{
We should find the way to route messages to specialized agents. For instance,
``Hey, here is a mineral spot'' or ``Hey, I'm being attacked, I need help''

{\bf Coordination} When creating a formation, who leads? who sparks the
coalition?

{\bf Broadcast problem} If I call for help, this message is relevant only to a
small percentage of agents. The rest of agents should ignore the message, but
the computational cost is there.

{\bf Hierarchical roles} Sometimes it could be necessary to create a squad leader
that commands a set of units. From that on, the units are subjugated to whatever
orders this agent commands.
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{BDI}
\begin{itemize}
	\item Beliefs
		\begin{itemize}
			\item All the enemy units are hostile and they will kill you
		\end{itemize}
	\item Desires. We should distinguish between ``economic'' and military
		\begin{itemize}
			\item Economic units always want to create buildings and structures
				that maximize economic or military throughput 
			\item Military units always want to destroy as much enemy units as
				possible
		\end{itemize}
	\item Intentions
		\begin{itemize}
			\item For military units, plans should be created that minimizes
				own loses and maximizes enemy loses
			\item For economic units, building construction should be negotiated
				with the military units in order of not jeopardize the
				resources.
		\end{itemize}
\end{itemize}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\frametitle{Cooperative}
When playing cooperative games with this architecture several problems arise:
\begin{itemize}
	\item The communication worsens. If there are $k$ players and a median of
		$N$ units we could have $(kN)^2$ possible communications.
	\item Coordination and leadership worsens too. Who leads, how to create
		coalitions, timing, etc\ldots are open problems
	\item Trading resources could be addressed
\end{itemize}

\note{
For the coordination there should be a negotiation between agents because for
instance when attacking, can be the right moment for an agent but not for the
other agent, or the target can be of no utility of one of the attackers
etc\ldots
}
}
\subsection{The General}
\frame{
\frametitle{The General}
\begin{itemize}
	\item Since the meta goal is to defeat the opponent all the architectures
		could benefit from having an agent role that keeps this goal in mind
	\item It can balance resources, control the communication channels, provide
		arbitrage in negotiations, etc.
\end{itemize}

}
